package org.reenscape.skill;
import org.reenscape.model.PacketParser;
public class Farming {
				/*
				Farming Emotes
2273 - Rake
2274 - Picking herbs
2279 - Picking herbs(Start)
2282 - Picking herbs(full)
2283 - Water plants
2284 - Trim diseased leaves
2288 - Plant cure
2291 - Seed dibber
2292 - Picking plants
2572 - Close compost bin
2695 - Trimming trees?
				*/
				
	/*			public int[] PlotMajorMinor = new int[300]; // Overall plot ID or a subplot
				public int[] PlotID = new int[300]; // Object ID of the plot
				public int[] PlotParent = new int[300]; // Only used if minor
				public int[] PlotX = new int[300]; // Minor - Object X
				public int[] PlotY = new int[300]; // Minor - Object Y
				public int[] PlotKind = new int[300]; // Minor - The type of the plot (not current growing plant)
				public int[] Growth = new int[300]; // Current stage of growth (0=seed;1=sproud;2=growth1;3=big;4=ready;
				public int[] WeedStatus = new int[300];
				public boolean[] Composted = new boolean[300];
				public boolean[] Watered = new boolean[300];
				public int[][] DeadID = new int[300][5];
				public int[][] DiseasedID = new int[300][5];
				public int[][] GrowthID = new int[300][4]; // Current stage of growth ID (0=seed;1=sproud;2=growth1;3=big;4=ready;
				public int[][][] PatchID = new int[300][20][1]; // Patch ids, 0=empty/unused?; 1=small_weeds; 2=medium_weeds; 3=large_weeds; Color: 0=light; 1=dark
				public int[] Color = new int[300]; // Color of patch light/dark
				
				public void Weed(int x, int y, int id, PacketParser p3){
						if(p3.distanceToPoint(x, y) == 1){
							for(int i = 0; i < 301; i++){
								if(PlotX[i] == x && PlotY[i] == y && WeedStatus[i] != 0){ // We're sure that this is weedable :)
									if(p3.WeedTimer == 0){
										p3.WeedAmount = 3;
										p3.WeedTimer = p3.WeedAmount * 4;
									}
									else {
										WeedStatus[i] -= 1;
										SetPlot(PatchID[i][WeedStatus][Color], x, y, PlotMajorMinor[i]);
										p3.Animation(2273);
										p3.WeedTimer -= 4;
										p3.WeedAmount -= 1;
										p3.addItem(6055, 1);
									}
								} else if(PlotX[i] == x && PlotY[i] == y && WeedStatus[i] == 0){ // Already weeded!
									p3.sendMessage("This patch doesn't need any weeding.");
								}
							}
						}
				}
				
				public void Inspect(int x, int y, int id, PacketParser p3){
					for(int i = 0; i < 301; i++){
						if(PlotX[i] == x && PlotY[i] == y){
							
						}
					}
				}
				
				public void Grow(int slot, PacketParser p3){
					int Chance = 0; int Percent = 0;
					if(!Watered[slot]) {
						SetPlot(DeadID[slot][(Growth[slot])], PlotX[slot], PlotY[slot], PlotMajorMinor[slot]);
						return;
					}
					if(!Composted[slot]){
						Percent = 50;
						Chance = (int)(java.lang.Math.random() * 0.5);
					}
					if(Composted[slot]){
						Percent = 20;
						Chance = (int)(java.lang.Math.random() * 0.2);
					}
					if(Chance <= Percent){ // Diseased
						SetPlot(DiseasedID[slot][(Growth[slot])], PlotX[slot], PlotY[slot], PlotMajorMinor[slot]);
					}
					else { // Grows successfully
						SetPlot(GrowthID[slot][(Growth[slot]+1)], PlotX[slot], PlotY[slot], PlotMajorMinor[slot]);
					}
				}
				
				public void SetPlot(int id, int x, int y, int major_minor){
					return;
				}*/
}